import axios from "axios"
import { getUrlParam } from "./getUrlData";
const http=axios.create({
    // baseURL:"http://localhost:9302/personasapi/analisis",
    baseURL:process.env.REACT_APP_BASE_URL,
    timeout:50000
})

http.interceptors.request.use((config)=>{
    config.headers['Authentication'] = getUrlParam("auth");
    return config;
},error=>{
    return Promise.reject(error)
})

http.interceptors.response.use((response)=>{
    return response.data
},error=>{
    return Promise.reject(error)
})

export  {
    http
}